home *** CD-ROM | disk | FTP | other *** search
- /* ARexx example for RexxFisher:
- *
- * Run this program while KFServer AND RexxFisher are running.
- * I'M MAKING NO EFFORT TO ASSURE THAT THESE TWO ARE AVAILABLE.
- *
- * Written by: Udo Schuermann
- * $VER: Versions 1.0 (1.3.95)
- *
- * Displays the latest version of every software package in the
- * database. It does this by following the VersionLinks until
- * there is no further link. Creates a nice little table of
- * programs along with release date (if any)
- *
- * NOTE: This script requires RexxFisher 1.10 or later because
- * it does not use RF_ prefixes for keywords.
- */
- options results
- address rexxfisher1
- /*
- if rc ~= 0 then do
- say "Cannot find RexxFisher; is it running?"
- exit 20
- end
- */
-
- version
- say result
-
- hello "VersionLink RexxFisher Demo"
- if rc ~= 0 then do
- say rexxfisher.lasterror
- exit 20
- end
-
- obtain dbname
- dbname = result
- obtain dbfile
- dbfile = result
- obtain dbsize
- dbsize = result
- say dbname "("dbfile") with" dbsize "records:"
-
- happy = 1
- rec = 1
- do while rec <= dbsize
-
- selectfish rec
- obtain nver
- nextrec = result
-
- if nextrec = 0 then
- fish = rec
- else
- do while nextrec ~= 0
- fish = nextrec
- selectfish nextrec
- obtain nver
- nextrec = result
- end
-
- getfish fish 75 "@{name}@{version|$VER=|}@{date|$DATE=|}@{author|$AUTH=|} \n"
- text = result
-
- n = index(text,'$VER=')
- if n > 0 then do
- delstr(text,n,5)
- if n < 30 then do
- insert(copies(' ',30-n),text,n)
- end
- end
-
- n = index(text,'$DATE=')
- if n > 0 then do
- delstr(text,n,6)
- if n < 40 then do
- insert(copies(' ',40-n),text,n)
- end
- end
-
- n = index(text,'$AUTH=')
- if n > 0 then do
- delstr(text,n,6)
- if n < 50 then do
- insert(copies(' ',50-n),text,n)
- end
- end
-
- say text" #"fish
-
- rec = rec + 1
- end
-
- bye
-